package Day005_API02.ZuoYe;

import java.util.Scanner;

public class Test5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入姓名:");
        String s1 = sc.next();
        System.out.println("输入年龄:");
        String s2 = sc.next();
        System.out.println("输入身高:");
        String s3 = sc.next();
        System.out.println("输入婚否:"); // 已婚/未婚
        String s4 = sc.next();
        System.out.println("输入性别:");
        String s5 = sc.next();

        //
        boolean marry = false;
        if (s4.equals("已婚")) {
            marry = true;
        }

        int age = Integer.parseInt(s2);
        double tall = Double.parseDouble(s3);
        //boolean marry = Boolean.parseBoolean(s4);
        char[] sexarr = s5.toCharArray();
        char sex = sexarr[0];

        Student1 s = new Student1(s1, age, tall, marry, sex);
        System.out.println(s.getName() + s.getAge() + s.getTall() + s4 + s.getSex());
    }
}

class Student1 {
    private String name;
    private int age;
    private double tall;
    private boolean marry;
    private char sex;

    public Student1() {
    }

    public Student1(String name, int age, double tall, boolean marry, char sex) {
        this.name = name;
        this.age = age;
        this.tall = tall;
        this.marry = marry;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getTall() {
        return tall;
    }

    public void setTall(double tall) {
        this.tall = tall;
    }

    public boolean isMarry() {
        return marry;
    }

    public void setMarry(boolean marry) {
        this.marry = marry;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }
}